package com.example.administrator.a2048game;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    private List<Number> numberList = new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        RecyclerView recyclerView = (RecyclerView) findViewById(R.id.rev_number);

        numberList.add(new Number(15));
        numberList.add(new Number(10));
        numberList.add(new Number(5));
        numberList.add(new Number(15));
        numberList.add(new Number(10));
        numberList.add(new Number(5));
        numberList.add(new Number(15));
        numberList.add(new Number(10));
        numberList.add(new Number(5));


        LinearLayoutManager layoutManager = new GridLayoutManager(this,3);

        recyclerView.setLayoutManager(layoutManager);

        Number_Adapter adapter = new Number_Adapter(numberList);
        recyclerView.setAdapter(adapter);
    }
}
